package com.jk.web.service;

import com.jk.common.model.UserBean;
import com.jk.web.service.hystrix.UserServiceHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;

@FeignClient(name = "zuul-server",fallback = UserServiceHystrix.class)
public interface UserService {

    @RequestMapping(value = "/user-server/user/login",consumes = "application/json")
    String login(@RequestBody UserBean userBean);

    @RequestMapping("/user-server/user/getUserInfoByAccount")
    UserBean getUserInfoByAccount(@RequestParam("account") String account);

    @RequestMapping(value = "/user-server/user/logon",consumes = "application/json")
    HashMap<String, Object> logon(@RequestBody UserBean userBean);
}
